/* gpmpup04.p - used to run the old gpmpup01.p */
/* Copyright 1986-2003 QAD Inc., Carpinteria, CA, USA.                  */
/* All rights reserved worldwide.  This is an unpublished work.         */
/*                                                                      */
/* This procedure takes a temp-table from gpmpup.p with a list of parts */
/* & sites for the main MRP process to run. This procedure is run on    */
/* an AppServer and passes back the elapsed time and the increment      */
/*                                                                      */
/* $Revision: 1.2 $                                                     */
/* $Revision: 1.2 $ BY: Tony Brooks    DATE: 10/31/02  ECO: *P0JR*      */
/*V8:ConvertMode=NoConvert                                              */


define temp-table tt_req_sub no-undo
       field tt_part like in_part
       field tt_site like in_site
       field tt_desc like pt_desc1
       field tt_orders as integer
       field tt_inc as integer
       field tt_etime as integer .

define input-output parameter table for tt_req_sub.

define variable increment as integer no-undo.

{mfglobal.i}
{gpmpvar2.i shared}

for each tt_req_sub:

    assign increment = max(increment,tt_inc).
    {gprunp.i "mrppl" "p" "gpmpup01"
                         "(input tt_part, input tt_site, input-output increment,
                       output tt_orders, output tt_etime,
                       output tt_desc)"}

    assign tt_inc = increment.

end.
